package gui.specialGUIs;

import gui.designComponents.TMTComboBox;
import gui.designComponents.TMTLabel;
import gui.designComponents.TMTNormalButton;
import gui.designComponents.TMTPanel;

import java.util.ResourceBundle;

import definitions.Commands;

import app.Controller;
import app.Model;
import bundles.BundleLoader;

/**
 * Panel to choose Statistic
 * 
 * @author MK
 * 
 */
public class StatsOverviewButtonPanel extends TMTPanel {

	private TMTComboBox statsSelection;

	public StatsOverviewButtonPanel(Model model, Controller controller) {

		ResourceBundle resBundle = BundleLoader.getResourceBundle();

		TMTLabel label = new TMTLabel(resBundle.getString("chooseStat"));
		add(label);

		statsSelection = new TMTComboBox(model.getStatsDescriptionValues());
		statsSelection.addActionListener(controller);
		statsSelection.setActionCommand(Commands.SHOW_STATS_OVERVIEW);

		add(statsSelection);

		TMTNormalButton printButton = new TMTNormalButton(resBundle
				.getString("print"));
		printButton.addActionListener(controller);
		printButton.setActionCommand(Commands.PRINT_STAT);
		add(printButton);
	}

	public TMTComboBox getStatsSelection() {
		return statsSelection;
	}
}